<template>
    <el-table
        :data="tableData"
        border
        style="width: 100%">
        <el-table-column
        type="index"
        width="50">
        </el-table-column>
        <el-table-column
        prop="name"
        label="商品名称"
        width="180">
        </el-table-column>
        <el-table-column
        prop="bigUnit"
        label="单价/大单位"
        width="180">
        </el-table-column>
        <el-table-column
        label="数量" prop="bigCount">
        </el-table-column>
        <el-table-column
        prop="smallUnit"
        label="小单位价格">
        </el-table-column>
        <el-table-column
        label="数量" prop="smallCount">
        </el-table-column>
        <el-table-column
        prop="money"
        label="金额">
        </el-table-column>
        <el-table-column
        prop="protectedDate"
        label="生产日期">
        </el-table-column>
    </el-table>
</template>

<script>
import {renderAddApi} from '../../http/InventoryApi/AddInApi'
export default {
    name:'viewList',
    data() {
        return{
            tableData:[]
        }
    },
    activated() {
        this.render()
    },
    methods:{
         render() {
          let orderId =this.$route.query.id
          renderAddApi(orderId)
         .then(res => {
            
            this.tableData = res.data.data
            console.log(this.tableData)
            console.log('添加结果渲染成功',res.data)
        })
        .catch(err => {
            console.log('添加结果渲染失败',err)
        })  
        }
    }
}
</script>


<style lang="scss" scoped>

</style>